import requests

total = 0
cookies = {
    'sessionid':'dbn70q9i6gw4blvxphcjodbub6dofq3y'
}
for i in range(1,21):
    url = f'https://www.mashangpa.com/api/problem-detail/1/data/?page={i}'
    response = requests.get(url,cookies=cookies)
    nums = response.json()['current_array']
    print(nums)
    for num in nums:
        print(num)
        total+=int(num)

print(total)
